using DevExpress.XtraEditors;
using DevExpress.XtraEditors.Controls;
using DevExpress.XtraEditors.Repository;
using System;
using System.ComponentModel;
using System.Drawing;
using System.Windows.Forms;
namespace Common.Base
{
	public class ProgressForm : XtraForm
	{
		private ProgressBarControl progressBarControl1;
		private Container components = null;
		protected override void Dispose(bool disposing)
		{
			if (disposing)
			{
				if (this.components != null)
				{
					this.components.Dispose();
				}
			}
			base.Dispose(disposing);
		}
		private void InitializeComponent()
		{
			this.progressBarControl1 = new ProgressBarControl();
			((ISupportInitialize)this.progressBarControl1.Properties).BeginInit();
			base.SuspendLayout();
			this.progressBarControl1.Location = new Point(4, 7);
			this.progressBarControl1.Name = "progressBarControl1";
			this.progressBarControl1.Properties.ExportMode = ExportMode.Value;
			this.progressBarControl1.Properties.ProgressViewStyle = ProgressViewStyle.Solid;
			this.progressBarControl1.Properties.ShowTitle = true;
			this.progressBarControl1.Size = new Size(322, 25);
			this.progressBarControl1.TabIndex = 0;
			this.AutoScaleBaseSize = new Size(5, 14);
			base.ClientSize = new Size(331, 38);
			base.ControlBox = false;
			base.Controls.Add(this.progressBarControl1);
			this.DoubleBuffered = true;
			base.FormBorderStyle = FormBorderStyle.FixedDialog;
			base.MaximizeBox = false;
			base.MinimizeBox = false;
			base.Name = "ProgressForm";
			base.ShowInTaskbar = false;
			base.StartPosition = FormStartPosition.CenterScreen;
			base.TopMost = true;
			((ISupportInitialize)this.progressBarControl1.Properties).EndInit();
			base.ResumeLayout(false);
		}
		public ProgressForm(UserControl parent)
		{
			this.InitializeComponent();
			if (parent != null)
			{
				base.Left = parent.Left + (parent.Width - base.Width) / 2;
				base.Top = parent.Top + (parent.Height - base.Height) / 2;
			}
			base.Height = this.progressBarControl1.Height + this.progressBarControl1.Top * 2 + 4;
		}
		public ProgressForm()
		{
			this.InitializeComponent();
		}
		public void SetProgressValue(int position)
		{
			this.progressBarControl1.Position = position;
			base.Update();
		}
	}
}
